<template>
	<!-- 立项信息 -->
	<div class="tobeDone">
		<tableIndex
			:tableData="tableData"
			:tableHead="tableHead"
			:isIndex="true"
			:isSelection="true"
			:notSearch="true"
			:isRadio="false"
			:height="500"
			:page="state.page"
			@page-change="pageChange"
			@resetList="resetList"
		>
			<template #btns> </template>
			<template #operate>
				<el-table-column label="操作" width="200" fixed="right">
					<template #default="{ row }">
						<el-button
							size="small"
							class="look"
							type="primary"
							@click="viewHandel(row)"
							>查看</el-button
						>
					</template>
				</el-table-column>
			</template>
		</tableIndex>
	</div>

	<public-dialog
		:title="'立项信息详情'"
		:width="'60%'"
		:confirmButtonTitle="'保存'"
		v-model:visible="visible"
		@onConfirm="onConfirm"
	>
		<CommonTitle class="m-b20" titleName="会议信息"></CommonTitle>
		<el-form :inline="true" label-width="80px" :model="state.formData">
			<el-row>
				<el-col :span="12">
					<el-form-item label="项目名称">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="会议名称">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="参会人员">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="会议时间">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="会议内容">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="会议附件">
						<!-- <el-input v-model="state.formData.user" placeholder="" /> -->
						<svg-icon icon-class="investment-icon-home" class="status-icon" />
						树兰（成都）医院有限公司
            <span style="m-l10">下载</span>
					</el-form-item>
				</el-col>
			</el-row>

      <CommonTitle class="m-b20" titleName="审批信息"></CommonTitle>
      <el-row>
				<el-col :span="12">
					<el-form-item label="审批人">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="审批时间">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="审批结果">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="审批意见">
						<el-input v-model="state.formData.user" disabled placeholder="" />
					</el-form-item>
				</el-col>

			</el-row>
		</el-form>
	</public-dialog>
</template>

<script setup>
import tableIndex from "@/components/table/index.vue";
import { fundApi } from "@/api/project";
import PublicDialog from "@/components/PublicDialog.vue";
import {
	ElForm,
	ElRow,
	ElCol,
	ElButton,
	ElSwitch,
	ElSelect,
} from "element-plus";
import CommonTitle from "@/components/CommonTitle.vue";

import { ref, onMounted, reactive } from "vue";
import { useRouter } from "vue-router";
let Router = useRouter();

const state = reactive({
	formData: {},
	page: {
		page: 1,
		pageSize: 10,
		total: 0,
	},
});
const visible = ref(false);
// const info = ref(null)
const tableData = ref([{}]);
const tableHead = ref([
	{
		prop: "projectSetName",
		label: "会议议题",
	},
	{
		prop: "projectName",
		label: "参会人",
	},
	{
		prop: "projectId",
		label: "会议内容",
	},
	{
		prop: "year",
		label: "审批结果",
		formatter: (row) => {
			return row.status ? "已申报" : "未申报";
		},
	},
	{
		prop: "quarter",
		label: "审批意见",
	},
	{
		prop: "quarter",
		label: "审批时间",
	},
	{
		prop: "accessAmount",
		label: "审批人",
	},
]);

const viewHandel = (row) => {
  visible.value = true
};

// 弹窗回调
const onConfirm = () => {};

const resetList = (e) => {
	getPage();
};
//分页变化
const pageChange = (e) => {
	state.page.page = e.page;
	state.page.pageSize = e.limit;
	getPage();
};
const getPage = (e) => {
	let obj = {
		pageNum: state.page.page,
		pageSize: state.page.pageSize,
		param: {
			...e,
		},
	};
	fundApi.getWeekPageList(obj).then((res) => {
		if (res.code == "200") {
			tableData.value = res.data.content;
			state.page.total = res.data.totalSize;
		}
	});
};
onMounted(() => {
	// getPage()
});
</script>

<style lang="scss" scoped>
.tobeDone {
	width: 100%;
	height: 100%;
}
.el-form-item {
	width: 100%;
}
</style>
